def get_breadcrumb(category):
    breadcrumb = dict(
        category_1='',
        category_2='',
        category_3=''
    )

    if category.parent is None:
        breadcrumb['category_1'] = category

    elif category.subs.count() == 0:
        breadcrumb['category_3'] = category
        cat2 = category.parent
        breadcrumb['category_2'] = cat2
        breadcrumb['category_1'] = cat2.parent
    else:
        breadcrumb['category_1'] = category.parent
        breadcrumb['category_2'] = category

    return breadcrumb
